var newsEditor;
window.onload = function() {
	newsEditor = CKEDITOR.replace('newsEditor',
    {
        height  : '200',
        width   : '850',
        toolbar : 'Basic'
    });
	
}

function save() {
	var editType = getValue("hidEditType");
	var url;
	if (editType == "1") {
		url = getHost() + "/site/newsEdit/save";
	} else {
		url = getHost() + "/site/newsEdit/addnews";
	}

	ajaxRequest(url,
	    {"Title" : getValue("titleTd"),
         "Content" : newsEditor.getData(),
         "InfoNo" :getValue("hidNewsNo")},
         save_callback);
}
function save_callback(data) {
	document.getElementById("newsEditForm").action = getHost() + "site/newsList";
    document.getElementById("newsEditForm").submit();
}
